package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IStoreActivityModel;
import com.wgts.wgts.mvp.model.imp.StoreActivityModel;
import com.wgts.wgts.mvp.presenter.IStoreActivityPresenter;
import com.wgts.wgts.mvp.presenter.imp.StoreActivityPresenter;
import com.wgts.wgts.mvp.view.IStoreActivityView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

/*
 *
 *
 *   data:2018/10/1119:49
 *
 */
@Module
public class StoreActivityModule {
    private IStoreActivityView view;

    public StoreActivityModule(IStoreActivityView view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    public IStoreActivityView provideView(){
        return view;
    }

    @ActivityScope
    @Provides
    public IStoreActivityModel provideModel(NetService netService){
        return new StoreActivityModel(netService);
    }

    @ActivityScope
    @Provides
    public IStoreActivityPresenter providePresenter(IStoreActivityView view, IStoreActivityModel model){
        return new StoreActivityPresenter(view, model);
    }


}
